From: Keyu Tao Date: Thu, 20 Jun 2024 15:09:27 +0000 (+0800) Subject: workspacesView: Make active workspace above siblings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~60 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ab8762924173e7aa6935bb4dcb73612d67bc948f;p=gnome-shell.git workspacesView: Make active workspace above siblings If there's a window flowing over the left edge in a workspace, the animation of showing or hiding overview in the left adjacent workspace would glitch, as the window would appear or disappear suddenly. This commits tries to fix it by making sure the active workspace are above other workspaces when updating workspaces or active workspace changed in workspacesView. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7364 Part-of: --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 24c24896d..0e962aa4a 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -440,6 +440,11 @@ class WorkspacesView extends WorkspacesViewBase { } } + _raiseActiveWorkspace() { + const activeWorkspace = this.getActiveWorkspace(); + this.set_child_above_sibling(activeWorkspace, null); + } + _updateWorkspaces() { let workspaceManager = global.workspace_manager; let newNumWorkspaces = workspaceManager.n_workspaces; @@ -472,10 +477,12 @@ class WorkspacesView extends WorkspacesViewBase { this._updateWorkspacesState(); this._updateVisibility(); + this._raiseActiveWorkspace(); } _activeWorkspaceChanged(_wm, _from, _to, _direction) { this._scrollToActive(); + this._raiseActiveWorkspace(); } _onDestroy() {